const int sensorPin = A0; void setup() { Serial.begin(9600); } void loop() { int sensorVal = analogRead(sensorPin); Serial.print("sensor Value: "); Serial.print(sensorVal); // convert the ADC reading to voltage float voltage = (sensorVal / 1024.0) * 5.0; // Send the voltage level out the Serial port Serial.print(", Volts: "); Serial.print(voltage); // convert the voltage to temperature in degrees C // the sensor changes 10 mV per degree // (voltage times 100) Serial.print(", degrees C: "); float temperature = voltage * 100; Serial.println(temperature); delay(100); }